<%@page import="cn.edu.pku.wxlib.user.model.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>

	<%-- <tr>	
		<td class="tdLabel">
			<span class="required">*</span>关联的老师表或学生表主键:
		</td>		
		<td>
		<form:input path="relatedId" id="relatedId" cssClass="required validate-integer max-value-2147483647" maxlength="10" />
		<font color='red'><form:errors path="relatedId"/></font>
		</td>
	</tr> --%>	
	
	<c:if test="${not empty user.userId}">
	<div class="form-group">
		<label class="col-sm-5 control-label"><span class="required">*</span>用户ID:</label>
		<p class="form-field-special ">&nbsp;<c:out value='${user.userId}'/></p>
	</div></c:if>
	
	<div class="form-group">
		<label class="col-sm-5 control-label"><span class="required">*</span>
			用户名:
		</label>		
		<form:input path="userName" id="userName" cssClass="form-field col-sm-10" maxlength="10" placeholder="用户名"/>
		<font color='red'><form:errors path="userName"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label"><span class="required">*</span>
			姓名:
		</label>		
		<form:input path="name" id="name" cssClass="form-field col-sm-10" maxlength="32" placeholder="姓名"/>
		<font color='red'><form:errors path="name"/></font>
	</div>
	<c:if test="${empty user.userId}">
	<div class="form-group">
		<label for="password" class="col-sm-5 control-label"><span class="required">*</span>密码:</label>
		<form:input type="password" path="password" id="password" cssClass="form-field col-sm-10" maxlength="32" placeholder="密码"/>
		<font color='red'><form:errors path="password"/></font>
	</div>	
	<div class="form-group">
    	<label for="confirmPassword" class="col-sm-5 control-label"><span class="required">*</span>确认密码</label>
    	<input type="password" class="form-field col-sm-10"  id="confirmPassword" placeholder="请重新输入新密码">
    	<span class="prompt"></span>
  	</div>
  	</c:if>
	<c:if test="${not empty user.userId}">
		<form:input type="hidden" path="password" id="password" cssClass="form-field col-sm-10" maxlength="32" placeholder="密码"/>
	</c:if>
	<div class="form-group">		
		<label class="col-sm-5 control-label">
			出生年月日:
		</label>
		<input value="${user.birthString}" placeholder="出生年月日" id="birthString" name="user.birthString" class="form-field" type="text"/>
		<font color='red'><form:errors path="birth"/></font>
	</div>
	<div class="form-group">		
		<label class="col-sm-5 control-label">
			性别:
		</label>	
		<select id="gender" name="user.gender" class="form-field">
			<option value="">性别</option>
            <option value="1"
            <c:if test="${user.gender==1}">selected="selected"</c:if>>男</option>
            <option value="2"
            <c:if test="${user.gender==2}">selected="selected"</c:if>>女</option>
		</select>
		<font color='red'><form:errors path="gender"/></font>
	</div>
	<div class="form-group">		
		<label class="col-sm-5 control-label">
			座机:
		</label>	
		<form:input path="tel" id="tel" cssClass="form-field col-sm-10" maxlength="12" placeholder="座机"/>
		<font color='red'><form:errors path="tel"/></font>
	</div>
	
	<div class="form-group">
		<label class="col-sm-5 control-label">
			手机:
		</label>		
		<form:input path="phone" id="phone" cssClass="form-field col-sm-10" maxlength="11" placeholder="手机"/>
		<font color='red'><form:errors path="phone"/></font>
	</div>	
	
	<div class="form-group">
		<label class="col-sm-5 control-label">
			邮箱:		
		</label>
		<form:input path="email" id="email" cssClass="validate-email form-field col-sm-10" maxlength="64" placeholder="邮箱"/>
		<font color='red'><form:errors path="email"/></font>
	</div>	
	
	<div class="form-group">
		<label class="col-sm-5 control-label">
			用户类型:
		</label>		
		<select id="type" name="user.type" class="form-field">
			<c:if test="${user.type==1}">
            <option value="1"
            <c:if test="${user.type==1}">selected="selected"</c:if>>老师</option></c:if>
            <c:if test="${user.type==2}">
            <option value="2"
            <c:if test="${user.type==2}">selected="selected"</c:if>>学生</option></c:if>
		</select>
		<font color='red'><form:errors path="type"/></font>
	</div>
	
	<c:if test="${not empty user.userId}">
		<div class="form-group">
			<label class="col-sm-5 control-label">
				创建时间:
			</label>		
			<input value="${user.createTimeString}" id="createTimeString" name="user.createTimeString" class="form-field" type="text" disabled/>
			<font color='red'><form:errors path="createTime"/></font>
		</div>	
	</c:if>
	
	<div class="form-group">
		<label class="col-sm-5 control-label">
			状态:
		</label>		
		<select id="state" name="user.state" class="form-field">
            <option value="0"
            <c:if test="${user.state==0}">selected="selected"</c:if>>禁用</option>
            <option value="1"
            <c:if test="${user.state==1}">selected="selected"</c:if>>启用</option>
		</select>
		<font color='red'><form:errors path="state"/></font>
	</div>
	<c:if test="${user.type eq 2}">
	<div class="form-group">
		<label class="col-sm-5 control-label">
			学号:
		</label>		
		<form:input path="studentNumber" id="studentNumber" cssClass="form-field col-sm-10" maxlength="10" placeholder="学号"/>
		<font color='red'><form:errors path="studentNumber"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			学校:
		</label>		
		<form:input path="school" id="school" cssClass="form-field col-sm-10" maxlength="32" placeholder="学校"/>
		<font color='red'><form:errors path="school"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			专业:
		</label>		
		<form:input path="major" id="major" cssClass="form-field col-sm-10" maxlength="32" placeholder="专业"/>
		<font color='red'><form:errors path="major"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			方向:
		</label>		
		<form:input path="direction" id="direction" cssClass="form-field col-sm-10" maxlength="32" placeholder="方向"/>
		<font color='red'><form:errors path="direction"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			入学年份:
		</label>		
		<form:input path="entranceClass" id="entranceClass" cssClass="form-field col-sm-10" maxlength="10" placeholder="入学年份"/>
		<font color='red'><form:errors path="entranceClass"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			最短学制:
		</label>		
		<form:input path="minYear" id="minYear" cssClass="form-field col-sm-10" maxlength="11" placeholder="最短学制"/>
		<font color='red'><form:errors path="minYear"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			最长学制:
		</label>		
		<form:input path="maxYear" id="maxYear" cssClass="form-field col-sm-10" maxlength="11" placeholder="最长学制"/>
		<font color='red'><form:errors path="maxYear"/></font>
	</div>
	</c:if>
	
	<c:if test="${user.type eq 1}">
	<div class="form-group">
		<label class="col-sm-5 control-label">
			教工号:
		</label>		
		<form:input path="teacherNumber" id="teacherNumber" cssClass="form-field col-sm-10" maxlength="10" placeholder="教工号"/>
		<font color='red'><form:errors path="teacherNumber"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			所在系:
		</label>		
		<form:input path="department" id="department" cssClass="form-field col-sm-10" maxlength="32" placeholder="系名"/>
		<font color='red'><form:errors path="department"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			职称:
		</label>		
		<form:input path="title" id="title" cssClass="form-field col-sm-10" maxlength="32" placeholder="职称"/>
		<font color='red'><form:errors path="title"/></font>
	</div>
	<div class="form-group">
		<label class="col-sm-5 control-label">
			办公室:
		</label>		
		<form:input path="office" id="office" cssClass="form-field col-sm-10" maxlength="32" placeholder="办公室"/>
		<font color='red'><form:errors path="office"/></font>
	</div>
	</c:if>	
	
	
	
		